

package es.realtimesystems.simplemulticast;
import java.net.*;

public class PruebaDatagramSocketReceptor 
{

  public PruebaDatagramSocketReceptor()
  {
  final String mn="PruebaDatagramSocketReceptor";
  try{
   Address dirMcast = new Address (InetAddress.getByName ("224.2.2.2"),20);

   DatagramSocketPTMF socket = new DatagramSocketPTMF(dirMcast,(byte)8);
   for(int nBytesRecibidos=0;;)
   {
      RegistroID_Socket_Buffer reg = socket.receive();
      nBytesRecibidos += reg.getBuffer().getMaxLength();
     // Log.log("\n\n RECIBIDO ACUMULADO:"+nBytesRecibidos,"");
   }

   //Log.log (mn,"Tiempo de Fin: " + Temporizador.tiempoActualEnMseg());

  }catch (java.net.UnknownHostException e)
   {
    Log.log (mn,""+e);
   }
  catch (java.io.IOException e)
   {
    Log.log (mn,""+e);
   }
  }

  public static void main(String[] args)
  {
   new PruebaDatagramSocketReceptor();
  }


}
